﻿@model RegisterViewModel
@{
    ViewData["Title"] = "注册";
}

<h2>@ViewData["Title"].</h2>

<form asp-controller="Account" asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
    <h3>注册新帐号.</h3>
    <hr />
    <div asp-validation-summary="All" class="text-danger"></div>
    <div class="form-group">
        <label asp-for="UserName" class="col-md-2 control-label">用户名:</label>
        <div class="col-md-10">
            <input asp-for="UserName" class="form-control" placeholder="输入用户名..."/>
            <span asp-validation-for="UserName" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">
        <label asp-for="Password" class="col-md-2 control-label">密码:</label>
        <div class="col-md-10">
            <input asp-for="Password" class="form-control" placeholder="输入密码..."/>
            <span asp-validation-for="Password" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">
        <label asp-for="ConfirmPassword" class="col-md-2 control-label">确认密码:</label>
        <div class="col-md-10">
            <input asp-for="ConfirmPassword" class="form-control" placeholder="确认密码..."/>
            <span asp-validation-for="ConfirmPassword" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <button type="submit" class="btn btn-default btn-success">注册</button>
        </div>
    </div>
</form>

@section Scripts {
    @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}
